﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITransactionService.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the ITagRepository type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Services.Interfaces
{
    using System.Collections.Generic;
    using System.ServiceModel;

    using Hisaab.Services.Entities;

    /// <summary>
    /// Defines the <seealso cref="ITransactionService"/> interface.
    /// </summary>
    [ServiceContract]
    public interface ITransactionService : IServiceBase<Transaction>
    {
        /// <summary>
        /// Gets the by id.
        /// </summary>
        /// <param name="id">The transaction id.</param>
        /// <returns>Transaction matching id</returns>
        [OperationContract]
        Transaction GetById(int id);

        /// <summary>
        /// Gets transaction details by id.
        /// </summary>
        /// <param name="id">The transaction id.</param>
        /// <returns>Transaction matching id</returns>
        [OperationContract]
        Transaction GetTransactionDetails(int id);

        /// <summary>
        /// Filtereds the list.
        /// </summary>
        /// <param name="filterAccountId">The filter account id.</param>
        /// <param name="filter">The filter.</param>
        /// <returns>List of transactions in filter</returns>
        [OperationContract]
        IEnumerable<Transaction> FilteredList(int filterAccountId, TransactionFilter filter);

        /// <summary>
        /// Relates the transactions.
        /// </summary>
        /// <param name="sourceTransactionId">The source transaction id.</param>
        /// <param name="destinationTransactionId">The destination transaction id.</param>
        [OperationContract]
        void RelateTransactions(int sourceTransactionId, int destinationTransactionId);
    }
}